package com.tencent.wxcloudrun.controller;

import com.tencent.wxcloudrun.util.HttpUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhe.wang@weimob.com
 * @date 2023/4/4 下午5:06
 */
@RestController
@RequestMapping("test")
@Slf4j
public class TestController {

    @GetMapping("/getServerIp")
    public void getServerIp() {
        try {
            String s = HttpUtil.doGet("https://api.weixin.qq.com/cgi-bin/get_api_domain_ip");
            log.error("获取服务器IP:" + s);
        } catch (Exception e) {
            log.error("获取服务器IP异常:" + e.getMessage());
        }
    }


}
